package org.codesandtags.cstutoringcenter;

import java.math.BigInteger;

public class Problem23 {
	
	public static void main(String[] args) {
		
		System.out.println(new Problem23().getSumPower6th(100));
	}
	
	public BigInteger getSumPower6th(int max){

		BigInteger sum 		= BigInteger.ZERO;
		BigInteger number 	= BigInteger.ZERO; 
		for (int i = 1; i <= max; i++) {
			number = BigInteger.valueOf(i);
			number = number.pow(6);
			sum = sum.add(number);
			System.out.println(i + " =>" + number);
		}
		
		return sum;
	}

}
